// default package
// Generated 28 Jul, 2014 8:04:07 PM by Hibernate Tools 3.4.0.CR1
package com.galaxy.bean;

import java.util.Date;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * CatalogsearchQuery generated by hbm2java
 */
@Entity
@Table(name = "catalogsearch_query", catalog = "magento")
public class CatalogsearchQuery implements java.io.Serializable {

	private Integer queryId;
	private CoreStore coreStore;
	private String queryText;
	private int numResults;
	private int popularity;
	private String redirect;
	private String synonymFor;
	private short displayInTerms;
	private Short isActive;
	private Short isProcessed;
	private Date updatedAt;
	private Set catalogsearchResults = new HashSet(0);

	public CatalogsearchQuery() {
	}

	public CatalogsearchQuery(CoreStore coreStore, int numResults,
			int popularity, short displayInTerms, Date updatedAt) {
		this.coreStore = coreStore;
		this.numResults = numResults;
		this.popularity = popularity;
		this.displayInTerms = displayInTerms;
		this.updatedAt = updatedAt;
	}

	public CatalogsearchQuery(CoreStore coreStore, String queryText,
			int numResults, int popularity, String redirect, String synonymFor,
			short displayInTerms, Short isActive, Short isProcessed,
			Date updatedAt, Set catalogsearchResults) {
		this.coreStore = coreStore;
		this.queryText = queryText;
		this.numResults = numResults;
		this.popularity = popularity;
		this.redirect = redirect;
		this.synonymFor = synonymFor;
		this.displayInTerms = displayInTerms;
		this.isActive = isActive;
		this.isProcessed = isProcessed;
		this.updatedAt = updatedAt;
		this.catalogsearchResults = catalogsearchResults;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "query_id", unique = true, nullable = false)
	public Integer getQueryId() {
		return this.queryId;
	}

	public void setQueryId(Integer queryId) {
		this.queryId = queryId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "store_id", nullable = false)
	public CoreStore getCoreStore() {
		return this.coreStore;
	}

	public void setCoreStore(CoreStore coreStore) {
		this.coreStore = coreStore;
	}

	@Column(name = "query_text")
	public String getQueryText() {
		return this.queryText;
	}

	public void setQueryText(String queryText) {
		this.queryText = queryText;
	}

	@Column(name = "num_results", nullable = false)
	public int getNumResults() {
		return this.numResults;
	}

	public void setNumResults(int numResults) {
		this.numResults = numResults;
	}

	@Column(name = "popularity", nullable = false)
	public int getPopularity() {
		return this.popularity;
	}

	public void setPopularity(int popularity) {
		this.popularity = popularity;
	}

	@Column(name = "redirect")
	public String getRedirect() {
		return this.redirect;
	}

	public void setRedirect(String redirect) {
		this.redirect = redirect;
	}

	@Column(name = "synonym_for")
	public String getSynonymFor() {
		return this.synonymFor;
	}

	public void setSynonymFor(String synonymFor) {
		this.synonymFor = synonymFor;
	}

	@Column(name = "display_in_terms", nullable = false)
	public short getDisplayInTerms() {
		return this.displayInTerms;
	}

	public void setDisplayInTerms(short displayInTerms) {
		this.displayInTerms = displayInTerms;
	}

	@Column(name = "is_active")
	public Short getIsActive() {
		return this.isActive;
	}

	public void setIsActive(Short isActive) {
		this.isActive = isActive;
	}

	@Column(name = "is_processed")
	public Short getIsProcessed() {
		return this.isProcessed;
	}

	public void setIsProcessed(Short isProcessed) {
		this.isProcessed = isProcessed;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "updated_at", nullable = false, length = 19)
	public Date getUpdatedAt() {
		return this.updatedAt;
	}

	public void setUpdatedAt(Date updatedAt) {
		this.updatedAt = updatedAt;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "catalogsearchQuery")
	public Set getCatalogsearchResults() {
		return this.catalogsearchResults;
	}

	public void setCatalogsearchResults(Set catalogsearchResults) {
		this.catalogsearchResults = catalogsearchResults;
	}

}
